using Tools.Domain.Specifications;
using Webshop20.Domain.Catalog.Core.Products;
using Webshop20.Domain.Shared.Products.Core;

namespace Webshop20.Domain.Catalog.Specifications
{
    public class CategorySpecification : Specification<Product>
    {
        public int CategoryId { get; private set; }

        public CategorySpecification(int categoryId) : base(product =>product.ProductCategory.Id == categoryId, "NO_CATEGORY")
        {
            CategoryId = categoryId;
        }
    }
}